<?php
class Area_model extends CI_Model {
	public function __construct() {
		parent :: __construct();
	}

	public function count_nums($name = ''){ /*取得总行数*/
			return $this->db->count_all('region');
	}

	public function list_areas($limit,$offset = 0){ /*获取分页region数据*/
		$this->db->limit($limit,$offset);
		$this->db->order_by("create_time", "desc");
		$query=$this->db->get('region');
		if ($query->num_rows() > 0){
			return $query->result();
		}else{
			return $query->result();
		}
	}
}
?>